Pandiagonal magic square

A pandiagonal magic square or panmagic square (also diabolic square, diabolical square or diabolical magic square) is a magic square with the additional property that the broken diagonals, i.e. the diagonals that wrap round at the edges of the square, also add up to the magic constant.

A pandiagonal magic square remains pandiagonally magic not only under rotation or reflection, but also if a row or column is moved from one side of the square to the opposite side. As such, an n×n pandiagonal magic square can be regarded as having 8n2 orientations.

Contents

4×4 panmagic squares

The smallest non-trivial pandiagonal magic squares are 4×4 squares.

1 8 13 12
14 11 2 7
4 5 16 9
15 10 3 6

In 4×4 panmagic squares, the magic constant of 34 can be seen in a number of patterns in addition to the rows, columns and diagonals:

Thus of the 86 possible sums adding to 34, 52 of them form regular patterns, compared with 10 for an ordinary 4×4 magic square.

There are only three distinct 4×4 pandiagonal magic squares, namely the one above and the following:

1 12 7 14
8 13 2 11
10 3 16 5
15 6 9 4
1 8 11 14
12 13 2 7
6 3 16 9
15 10 5 4

In any 4×4 pandiagonal magic square, any two numbers at the opposite corners of a 3×3 square add up to 17. Consequently, no 4×4 panmagic squares are associative.

5×5 panmagic squares

There are many 5×5 pandiagonal magic squares. Unlike 4×4 panmagic squares, these can be associative. The following is a 5×5 associative panmagic square:

20 8 21 14 2
11 4 17 10 23
7 25 13 1 19
3 16 9 22 15
24 12 5 18 6

In addition to the rows, columns, and diagonals, a 5×5 pandiagonal magic square also shows its magic sum in four "quincunx" patterns, which in the above example are:

17+25+13+1+9 = 65 (center plus adjacent row and column squares)
21+7+13+19+5 = 65 (center plus the remaining row and column squares)
4+10+13+16+22 = 65 (center plus diagonally adjacent squares)
20+2+13+24+6 = 65 (center plus the remaining squares on its diagonals)

Each of these quincunxes can be translated to other positions in the square by cyclic permutation of the rows and columns (wrapping around), which in a pandiagonal magic square does not affect the equality of the magic sums. This leads to 100 quincunx sums, including broken quincunxes analogous to broken diagonals.

The quincunx sums can be proved by taking linear combinations of the row, column, and diagonal sums. Consider the panmagic square

A B C D E
F G H I J
K L M N O
P Q R S T
U V W X Y

with magic sum Z. To prove the quincunx sum A+E+M+U+Y = Z (corresponding to the 20+2+13+24+6 = 65 example given above), one adds together the following:

3 times each of the diagonal sums A+G+M+S+Y and E+I+M+Q+U
The diagonal sums A+J+N+R+V, B+H+N+T+U, D+H+L+P+Y,and E+F+L+R+X
The row sums A+B+C+D+E and U+V+W+X+Y

From this sum the following are subtracted:

The row sums F+G+H+I+J and P+Q+R+S+T
The column sum C+H+M+R+W
Twice each of the column sums B+G+L+Q+V and D+I+N+S+X.

The net result is 5A+5E+5M+5U+5Y = 5Z, which divided by 5 gives the quincunx sum. Similar linear combinations can be constructed for the other quincunx patterns H+L+M+N+R, C+K+M+O+W, and G+I+M+Q+S.

External links

References